package com.tpyule.tpclass.service;

import com.tpyule.tpclass.entity.bo.NoteCourseBo;
import com.tpyule.tpclass.entity.bo.UserAnnounceBo;
import com.tpyule.tpclass.entity.dto.AnnounceQueryDto;
import com.tpyule.tpclass.entity.pojo.Notify;
import com.tpyule.tpclass.entity.pojo.User;
import com.tpyule.tpclass.entity.pojo.UserNotify;

import java.util.List;

/**
 * @author zzz
 * @version 1.0
 * @date 2020/4/22 13:51
 */
public interface NotifyService {

    /**
     * 添加通知
     * @param notify
     * @return
     */
    public int createRemind(Notify notify);
    /**
     * 添加通知
     * @param notify
     * @return
     */
    public int createAnnounce(Notify notify);

    /**
     * 管理者获取公告
     * @param announceQueryDto
     * @return
     */
    public List<Notify> getListAnnounce(AnnounceQueryDto announceQueryDto);


    /**
     * 管理员获取公告数量
     * @return
     */
    public int getSizeAnnounce();

    /**
     * 拉取公告
     * @param user
     */
    public void pullAnnounce(User user) throws Exception;


    /**
     * 添加用户通知队列
     * @param userNotify
     * @return
     */
    public int addUserNotify(UserNotify userNotify);


    /**
     * 获取用户最近30填公告
     * @param userId
     * @return
     */
    public List<UserAnnounceBo> getListAnnounce(String userId);



    /**
     * 获取UserNitify中未读的数量
     * @param userId
     * @return
     */
    public int getNoReadCount(String userId);

    /**
     * 更新一个为已读
     * @param userNotify
     * @return
     */
    public int updateNoRead(UserNotify userNotify);

    /**
     * 更新全部为已读
     * @param userId
     * @return
     */
    public int updateAllNoRead(String userId);


}
